<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>订单预付款信息列表</title>
</head>
<script type="text/javascript">

function doIns(){
	document.all["operate"].value = "inspage";
	document.forms[0].submit();
}
function doSupply(cid){
	doQueryMess("<%=path %>/plangather.action?operate=updpage&orderId="+cid,"","600","320");
}
function doGathering(cid){
	document.all["oid"].value = cid;
	document.all["operate"].value = "gather";
	document.forms[0].submit();
}
function doPrint(){
	var oldaction = document.forms[0].action;
	document.forms[0].action = "<%=path %>/docs/ys_financial/plangather_print.jsp";
	document.forms[0].submit();
	document.forms[0].action = oldaction;
}
</script>
<body>
<form action="<%=path %>/plangather.action" method="post" >
<table width="85%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
		<tr>
    		<td width="760" class="MainBody_title"><hello:forValue type="title" /></td>
    		<td></td>
		</tr>
      <tr>
        <td valign="top" colspan="2">
        <table border="0" cellspacing="0" cellpadding="0" style="margin: 5px 0 10px 20px;width:90%">
			<tr height="35">
				<td align="right" ><input name="oid" type="hidden" value=""/><input name="operate" type="hidden" value=""/>
				<input name="createuser" value="${sessionScope.admin_user.personname}" type="hidden"  /></td>
				<td align="right" ><input type="button" value="查询" class="btn" onclick="doSel()"/>&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="button" value="打 印" class="btn" onclick="doPrint()"/></td>
			</tr>
			<tr >
				<td colspan="2" class="box01">
				<SPAN>订单编号：<input type="text" name="orderId" value="${orderId}" maxlength="30"></SPAN>
				<SPAN>客户名称：<input type="text" name="clientName" value="${clientName}" maxlength="30"></SPAN>
				<SPAN>印刷品名称：<input type="text" name="name" value="${name}" maxlength="30"></SPAN>
				<SPAN>交货日期：<input type="text" name="begin" value="${begin}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30">
				&nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="end" value="${end}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30"></SPAN>
				</td>
			</tr>
		</table>
        <table border="0" cellpadding="0" cellspacing="0"  class="MainBody_table">
           <tr>
				<th width="10%" nowrap="nowrap">订单编号</th>
				<th width="15%" nowrap="nowrap">客户名称</th>
				<th width="10%" nowrap="nowrap">订单名称</th>
				<th width="10%" nowrap="nowrap">订单状态</th>
				<th width="10%" nowrap="nowrap">交货日期</th>
				<th width="8%" nowrap="nowrap">总金额</th>
				<th width="8%" nowrap="nowrap">预付款</th>
				<th width="8%" nowrap="nowrap">付款方式</th>
				<th width="8%" nowrap="nowrap">财务状态</th>
				<th width="8%" nowrap="nowrap">操作</th>
			</tr>
			<c:forEach items="${listinfo}" varStatus="status" var="rows">
			<tr>
				<td nowrap="nowrap"><a href="<%=path %>/orderSel.action?oid=${rows.id}" title="订单详细信息">${rows.orderId}</a></td>
				<td nowrap="nowrap">${rows.clientName}</td>
				<td nowrap="nowrap">${rows.name}</td>
				<td nowrap="nowrap">${rows.status}</td>
				<td nowrap="nowrap">${rows.finishTime}</td>
				<td nowrap="nowrap">${rows.total}</td>
				<td nowrap="nowrap"><font color="<c:if test="${rows.finalflag == '已结算'}">green</c:if><c:if test="${rows.finalflag != '已结算'}">red</c:if>" style="font-weight: bold">${rows.frontCash}</font></td>
				<td nowrap="nowrap">${rows.payType}</td>
				<td nowrap="nowrap">${rows.finalflag}</td>
				<td nowrap="nowrap">
				<c:if test="${rows.frontCash == '0.0'}">
				无预付款
				</c:if>
				<c:if test="${rows.frontCash != '0.0'}">
				<c:if test="${rows.finalflag != '已结算'}">
				<span class='RoleSpan' onclick="doGathering('${rows.orderId}')" title='标记结算预收款' style='color: red;' onmouseout="doMsOut('red')" onmouseover='doMsOver()'>标记收款</span>
				</c:if>
				<c:if test="${rows.finalflag == '已结算'}">
				<span class='RoleSpan' onclick="doSupply('${rows.orderId}')" title='补充详细信息' style='color: green;' onmouseout="doMsOut('green')" onmouseover='doMsOver()'>补充信息</span>
				</c:if>
				</c:if>
				</td> 
			</tr>
			</c:forEach>
		<c:if test="${empty listinfo}">
			<tr>
				<td colspan="11" align="center">暂时没有您可以浏览的数据</td>
			</tr>
		</c:if>
          </table>
          <c:if test="${!empty listinfo}">
          <table border="0" cellpadding="0" cellspacing="0" class="MainBody_fun">
            <tr>
              <td>
               <hello:AllPage />
			  </td>
            </tr>
          </table>
          </c:if>
          </td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>